import java.util.Optional;

/**
 * @author chihb
 * @create-time 2024/7/9 15:04
 * @description
 */
public class Test {
    public static void main(String[] args) {
        Author author=getAuthor();
        Optional<Author> optional=Optional.ofNullable(author);
        optional.ifPresent(author1 -> System.out.println(author1.getName()));
    }
    public static Author getAuthor(){
        Author author=new Author(1L,"sss",25,"wehiekodw",null);
        return null;
    }
}
